Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • How to count strings across variables*

    Hello,
    How can I count string values (Topic_1 through to Topic_4) across multiple variables ? I want the count to be in the variable _NTopics.
    Click image for larger version

Name:	Except.jpg
Views:	1
Size:	153.4 KB
ID:	1658886

  • #2
    I tried to follow the example on Stata | FAQ: Counting distinct strings across a set of variables but to no avail. I am getting this
    Click image for larger version

Name:	Except2.jpg
Views:	1
Size:	137.9 KB
ID:	1658888
    response in the attachment.

    Comment


    • #3
      Welcome to Statalist.

      You have accidentally posted your topic in Statalist's Mata Forum, which is used for discussions of Stata's Mata language, which is different than Stata's command language, and different than Stata's matrix commands. Your question will see a more appropriate and much larger audience if you post it in Statalist's General Forum.

      Also, if you have not already done so, take a look at the Statalist FAQ linked to at the top of this page for posting guidelines and suggestions.

      Comment

      Working...
      X